package com.ys.object;

import java.util.Objects;

/**
 * 描述: TODO
 *
 * @author CodeYang
 * @version 2020/12/16 11:00
 */
public class Person {

    int age;
    int score;
    double max;
    float min;


    @Override
    public boolean equals(Object o) {

        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return age == person.age &&
                score == person.score &&
                Double.compare(person.max, max) == 0 &&
                Float.compare(person.min, min) == 0;
    }

    @Override
    public int hashCode() {
        return Objects.hash(age, score, max, min);
    }
}
